@import '~styles/vars';
@import '~styles/extendables';
@import '~styles/mixins';

$header-height: 65px;
$footer-height: 70px;

.chat {
  position: relative;
  padding-top: $toolbar-height;
  background: $color-white;

  .btn,
  .input {
    .icon {
      color: $color-grey-shade-2;
    }
  }

  > header {
    @extend %app-width;
    display: flex;
    height: $header-height;
    position: fixed;
    padding: 0 10px;

    .avatar {
      width: 50px;
    }

    .right {
      @extend %center-x-y;
      margin-left: auto;

      .pill {
        margin-right: 15px;
      }

      .btn-arrow {
        @include highlight(35px, 35px, 10px);
        font-size: 23px;
      }
    }
  }

  .messages {
    padding: 10px 5px 40px;
    margin-top: $header-height;
    overflow: auto;
    height: calc(#{$mobile-vh} - #{$toolbar-height + $header-height + $footer-height});

    .message {
      margin-bottom: 10px;

      header {
        text-transform: uppercase;
        color: $color-blue;
        font-weight: $font-semi-bold;
        font-size: 12px;
        margin-bottom: 3px;
      }

      blockquote {
        border-left: 2px solid $color-blue;
        padding-left: 5px;
        margin: 0;
      }

      &.other {
        header {
          color: $color-salmon;
        }

        blockquote {
          border-left-color: $color-salmon;
        }
      }
    }
  }

  footer {
    @extend %app-width;
    position: fixed;
    bottom: 0;
    height: $footer-height;
    border-top: 1px solid $color-grey-shade-4;

    .icon {
      font-size: 20px;
    }

    .gravatar {
      &.typing {
        &:after {
          position: absolute;
          top: -50px;
          left: 38px;
          content: '';
          width: 30px;
          height: 30px;
          background: url(#{$base-image-path}/thought-bubble.png) no-repeat;
          background-size: 100%;
        }

        .avatar {
          top: -32px;
        }
      }

      .avatar {
        position: absolute;
        top: -20px;
        width: 50px;
      }
    }

    .inner-content {
      @extend %center-x-y;
      position: relative;
      display: flex;
      height: 100%;
      padding: 10px;
      background: $color-white;

      .btn-camera {
        margin-right: 8px;
      }

      .btn-camera,
      .input input[type='text'] {
        background: $color-grey-shade-6;
      }

      .input {
        width: 245px;
        margin-right: 8px;

        .icon {
          margin-top: -10px;
          filter: none;
        }

        input[type='text'] {
          font-weight: $font-regular;
          border: 0;

          &::placeholder {
            color: $color-grey-shade-3;
          }
        }
      }

      .right {
        @extend %center-x-y;

        .btn-archive {
          display: flex;
          margin: 0 5px;

          .icon {
            &:first-child {
              transform: rotate(-5deg);
            }

            &:last-child {
              transform: rotate(5deg);
            }
          }
        }
      }
    }
  }
}
